package com.xzg.erp.system.web;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xzg.erp.common.Constants;
import com.xzg.erp.system.entity.SysOrganization;
import com.xzg.erp.system.entity.SysUser;
import com.xzg.erp.system.entity.dto.UserPageDto;
import com.xzg.erp.system.entity.dto.UserQueryDto;
import com.xzg.erp.system.service.ISysOrganizationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 组织表 前端控制器
 * </p>
 *
 * @author qwc
 * @since 2025-02-04
 */
@RestController
@RequestMapping("/sysOrganization")
public class SysOrganizationController {

    @Autowired
    private ISysOrganizationService sysOrganizationService;

    @PostMapping("/tree")
    public ResponseEntity tree() {
        return ResponseEntity.ok(sysOrganizationService.tree());
    }
}
